<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//声明数组，并存储若干水果，计算其长度，并遍历打印输出。
			let fruit=["苹果", "香蕉", "西瓜", "梨", "哈密瓜", "火龙果"];
			function leng(){
				var len=fruit.length;
				document.write("数组长度为："+len)
			}
			leng();
			document.write("<br />");
			for (let i = 0, len = fruit.length; i < len; i++) {
				document.write(fruit[i]);
				document.write("<br />");
			}
		</script>
	</body>
</html>
